/*
 * Functions that are needed to create the map.  You must declare a
 * variable called MARKERS before.  This exports the function
 * 'onLoad()' to be used as the onload event of the page to create the
 * map.
 */

var map;

function onLoad() {

  var m = document.getElementById("map");
  if (!m) {
    alert("You must defined an HTML element named 'map'");
    return;
  }

  map = new GMap2(m);
  map.addControl(new GLargeMapControl());
  map.addControl(new GMapTypeControl());
  
  
  try {
    var lat = LATITUDE_START;  // map.php
    var lng = LONGITUDE_START; // map.php
    var scale = 11;
    map.setCenter(new GLatLng(lat,lng),scale);
    } catch (e) { /* if it's not defined for some reason */ }
    
    resetDatePicker();
